/**
 * Created by felix on 2017/4/12.
 */
import React from 'react';
import { Switch } from 'antd';

export default function StatusSwiitch({
                                          status,
                                          checkTxt = '启',
                                          unCheckTxt = '停',
                                          onChange = (v) => v,
                                      }) {
    const dc = status === '1' || status === 1;
    return (
        <Switch
            defaultChecked={dc}
            checkedChildren={checkTxt}
            unCheckedChildren={unCheckTxt}
            onChange={onChange}
        />
    );
}
